package com.gcspring.h2db.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "device_id_mapper")
@ApiModel("设备id映射表")
public class DeviceIdMapper implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty("ID")
    private Long id;

    @Column(name = "sb_id_dest", nullable = false, unique = true)
    @ApiModelProperty("设备ID")
    private String sbIdDest;

    @Column(name = "sb_id_src", nullable = false)
    @ApiModelProperty("原小区中id")
    private String sbIdSrc;

    @Column(name = "type")
    @ApiModelProperty("类型编码 3位  131为人脸抓拍机，121为车辆抓拍机，220为门禁点，125为门禁设备，126为访客设备，119为在线视频图像信息采集设备")
    private String type;

    @Column(name = "create_time")
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime = new Date();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSbIdDest() {
        return sbIdDest;
    }

    public void setSbIdDest(String sbIdDest) {
        this.sbIdDest = sbIdDest;
    }

    public String getSbIdSrc() {
        return sbIdSrc;
    }

    public void setSbIdSrc(String sbIdSrc) {
        this.sbIdSrc = sbIdSrc;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

}
